package com.hwpt.controller.user;


import com.hwpt.result.Result;
import com.hwpt.service.UserInfoService;
import com.hwpt.vo.user.UserAllInfoVO;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/user/info")
@Slf4j
@RequiredArgsConstructor
@Tag(name = "用户信息接口")
public class UserInfoController {

    private final UserInfoService userInfoService;

    @PutMapping("/sync")
    @ApiOperation("同步用户基本信息")
    public Result<Void> syncBasicInfo(@RequestBody UserAllInfoVO userAllInfoVO) {
        log.info("同步用户信息：{}", userAllInfoVO.toString());
        userInfoService.syncBasicInfo(userAllInfoVO);
        return Result.success();
    }
}
